package com.alpha.eceasy.mall.api.entity;

import com.alpha.eceasy.extension.BaseFormInfo;
import com.alpha.eceasy.mall.api.dto.MallOrderDTO;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.io.Serial;

/**
 * 支付订单
 *
 * @author medical
 * @since 2019-05-28 23:57:58
 */
@Data
@TableName("mall_order")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "支付订单")
@AllArgsConstructor
@NoArgsConstructor
public class MallOrder extends BaseFormInfo<MallOrder> {
    @Serial
    private static final long serialVersionUID = 641655770L;
	@Schema(description =  "支付订单编码")
	private String guid;
	@Schema(description =  "买家id")
	private String customerGuid;
	@Schema(description =  "订单类型0.商城订单 1.服务尾款 2.销售管理 3.报价管理")
	private Integer orderType;

	public MallOrder(MallOrderDTO dto) {
		BeanUtils.copyProperties(dto, this);
	}
}
